<?php
class installModel extends baseModel{

    public function create_db($data){
        $model=new cpModel($data);
        $sql="CREATE DATABASE IF NOT EXISTS `".$data['DB_NAME']."` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;";
        return @$model->query($sql);
    }

    public function run_sql($data,$sql_array=array()){
        $model=new cpModel($data);
        foreach($sql_array as $sql)
        {
            if(!@$model->db->query($sql)){
                return false;
            }
        }
        return true;
    }


}

?>